Skip to content

Branch switching events for applications - #610

Open
lukelowry wants to merge 7 commits into
developfrom
lukel/component-enable-dev
Open

lukelowry wants to merge 7 commits into
developfrom
lukel/component-enable-dev

Conversation

@lukelowry

@lukelowry lukelowry commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds solver events that take a branch in and out of service. Part 1 of #606, modern attempt of #391. This Branch model is designed specifically for ContingencyAnalysis , as introducing breaker and relay raises the same problem we faced with BusFault. Next PR will be a smooth breaker and relay.

@pelesh

Proposed changes

  • Branch::setEnabled(bool), Implemented using an admittance mask on the branch equations.
  • SystemModel::getComponent(id) looks up a branch by its case-file id.
  • Solver events enable / disable take a device id and are handled like fault events.
  • Example DynamicSimulation/Toy/ThreeBusBasic: BR_1_2 opens at 1 s and recloses at 5 s.
  • Tests: BranchTests::singularJacobian (pattern kept, values zero)

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • The CHANGELOG.md has been updated to reflect the changes.

Further comments

  • Islanding is not handled yet

Repsonse

ThreeBusBasic speed

@lukelowry
lukelowry requested a review from pelesh October 5, 2026 20:38
@lukelowry
lukelowry force-pushed the lukel/component-enable-dev branch 2 times, most recently from 1df5bb8 to 959899f Compare October 6, 2026 08:29
@nkoukpaizan nkoukpaizan added the development Features/Tools related to development of GridKit, rather than use as a library. label Oct 6, 2026
@lukelowry
lukelowry force-pushed the lukel/component-enable-dev branch from 959899f to 3cb2a38 Compare October 6, 2026 20:54
@nkoukpaizan nkoukpaizan added new study New study or event capability and removed development Features/Tools related to development of GridKit, rather than use as a library. labels Oct 6, 2026

@pelesh pelesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

There is one major item that needs to be addressed and that is to identify cases when taking line out of service makes underlying linear system singular. That needs to be clearly identified in this PR, so that a remedy can be implemented subsequently.

My guess is that islanding would be one such instance. This can be easily checked with ten-gen example. There may be other instances where zeroing out branch Jacobian stamp may lead to singular system Jacobian.

@abirchfield and @shakedregev: please chime in.

The rest are nitpicking suggestions.

Comment thread GridKit/Model/PhasorDynamics/Branch/Branch.hpp Outdated
Comment thread application/PhasorDynamics/ContingencyAnalysis.cpp Outdated
Comment thread application/PhasorDynamics/DynamicSimulation.cpp Outdated
Comment thread application/PhasorDynamics/README.md Outdated
Comment thread GridKit/Model/PhasorDynamics/Branch/BranchImpl.hpp Outdated
@lukelowry

Copy link
Copy Markdown
Collaborator Author

Addressed!

@lukelowry
lukelowry requested a review from pelesh October 6, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new study New study or event capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants